package com.uam.core.entity.model.entity.model;

import java.util.List;
import java.util.Map;

public class ElasticsearchQueryResult extends QueryResult {

	public static final ElasticsearchQueryResult EMPTY = new ElasticsearchQueryResult(0, null);

	private List<Map<String, Object>> data = null;

	public ElasticsearchQueryResult(int total, List<Map<String, Object>> data) {
		super(total);
		this.data = data;
	}

	public List<Map<String, Object>> getData() {
		return data;
	}

	public enum CommonFields {

		ID("id"), LON("lon"), LAT("lat"), POSITION("position"), ALTITUDE("altitude"), TASK_ID("task_id"), NAME("name"),
		STATUS("status"), TYPE("type");

		private String name = null;

		private CommonFields(String name) {
			this.name = name;
		}

		public String getName() {
			return name;
		}

	}

	public enum RouteComponentFields {

		OWN_TIME("own_time"), SPEED("speed"), ACCELERATION("acceleration"),
		COMMUNICATION_SIGNAL("communication_signal"), NAVIGATION_SIGNAL("navigation_signal"),
		SUPERVISORY_SIGNAL("supervisory_signal"), SAFE_DISTANCE("safe_distance"),
		POSITIONING_ACCURACY("positioning_accuracy"), CONN_NUM("conn_num"),
		COMMUNICATION_SIGNAL_NUM("communication_signal_num"), NAVIGATION_SIGNAL_NUM("navigation_signal_num"),
		SUPERVISORY_SIGNAL_NUM("supervisory_signal_num"), NEXT_POSITION_ID("next_position_id"),
		NEXT_POSITION_DISTANCE("next_position_distance"), NEXT_POSITION_COST("next_position_cost"),
		LAST_POSITION_ID("last_position_id"), LAST_POSITION_DISTANCE("last_position_distance"),
		LAST_POSITION_COST("last_position_cost"), REMAINING("remaining"), CONFLICT_TASK_ID("conflict_task_id"),
		POSITION_SHAPE("position_shape"), IS_PIVOTAL("is_pivotal"), RETARD_DISTANCE("retard_distance"),
		INTERSECTION_DISTANCE("intersection_distance"), HOVER_COST("hover_cost"),
		COMMUNICATION_SIGNAL_POSITION("communication_signal_position"),
		NAVIGATION_SIGNAL_POSITION("navigation_signal_position"),
		SUPERVISORY_SIGNAL_POSITION("supervisory_signal_position");

		private String name = null;

		private RouteComponentFields(String name) {
			this.name = name;
		}

		public String getName() {
			return name;
		}

	}

	public enum RouteIntegrationFields {

		TRACK("track"), START_TIME("start_time");

		private String name = null;

		private RouteIntegrationFields(String name) {
			this.name = name;
		}

		public String getName() {
			return name;
		}

	}

	public enum AreaFields {

		BORDER("border"), COORDINATES("coordinates");

		private String name = null;

		private AreaFields(String name) {
			this.name = name;
		}

		public String getName() {
			return name;
		}

	}

	public enum BaseStationFields {

		RANGE("range"), MAXRANGE("maxrange"), ANTETYPE("antetype"), SECTOR("sector"), FREQUENCY("frequency"),
		MINFREQ("minfreq"), MAXFREQ("maxfreq"), ANGLE("angle"), MAXANGLE("maxangle");

		private String name = null;

		private BaseStationFields(String name) {
			this.name = name;
		}

		public String getName() {
			return name;
		}

	}
}
